package exercise.day3;

import java.util.Scanner;

/**
 * @author Dianzhi Han
 * @version 1.0
 * @description: TODO
 * @date 2022/10/27 1:31
 */
public class ContinuousLongestStr {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] split = s.split("[^0-9]"); //正则表达式，按照除了0-9的字符分隔，可以调试看下
        String tmp = "";

        for (int i = 0; i < split.length; i++) {
            if (tmp.length() < split[i].length()) {
                tmp = split[i];
            }
        }
        System.out.println(tmp);
    }
}

/**
 * 传统方法
 */


//import java.util.*;
//public class Main {
//    public static void main(String[] args) {
//        Scanner in = new Scanner(System.in);
//        String str = in.nextLine();
//        String ret = "";
//        String temp = "";
//        for(int i =0;i<str.length();i++){
//            char cur = str.charAt(i) ;
//            if(cur <= '9' && cur >= '0'){
//                temp = temp + cur;
//            }else{
//                if(temp.length() > ret.length()){
//                    ret = temp;
//                }
//                temp = "";
//            }
//        }
//
//        if(ret.length() < temp.length()){
//            ret = temp;
//        }
//
//        System.out.print(ret);
//    }
//}
